Problem Note 43828: The error "Expecting a variable name after %LET" occurs in SAS® 9.3
The %LET statement in SAS® 9.3 might fail, resulting in the following message in the SAS log:
ERROR: Expecting a variable name after %LET.
This problem is most likely to occur when the %LET statement is defined within a macro that is called by another macro. Here is an example that replicates the problem:
%macro foo(arg1);
%put This is FOO! &=arg1;
%mend foo;
%macro bar;
%foo(%let x = 1; &x);
%mend bar;
%bar;
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Z64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft® Windows® for x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Standard Edition | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 for x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2008 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2008 for x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows XP Professional | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Enterprise 32 bit | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Enterprise x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Home Premium 32 bit | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Home Premium x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Professional 32 bit | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Professional x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Ultimate 32 bit | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Ultimate x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows Vista | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows Vista for x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled AIX | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled HP-UX | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled Solaris | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
HP-UX IPF | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Linux | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Linux for x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
Solaris for x64 | 9.3 | 9.3_M1 | 9.3 TS1M0 | 9.3 TS1M1 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Changes made in the macro processor for SAS 9.3 can cause an error with the %LET statement. The error message reported in the SASLOG is:
ERROR: Expecting a variable name after %LET.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2012-02-17 09:23:12 |
Date Created: | 2011-07-26 14:18:00 |